STEP 1: Let's start by generating a random number!

Variables can store values that change or values that we don't know in advance.

  • In the LOGIC tab, go to and drag Random Integer into the editor.
  • Then, change the name of the variable from my_var to roll_1.

We've added text that will show you the random number. You won't be able to see it in your code.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)